const ESLintPlugin = require('eslint-webpack-plugin');

module.exports = {
    mode: "development",
    devtool: "eval-source-map",
    devServer: {
        port: 8080,
        open: true,  //打包成功后，自动打开浏览器
        // 错误或警告是否弹出框
        client: {
            overlay: {
                errors: true,
                warnings: false
            }
        }

    },
    plugins: [
        new ESLintPlugin({
            eslintPath: 'eslint',
            extensions: ['js', 'jsx', 'ts', 'tsx'],
            exclude: ['node_modules'],
            fix: false,
            formatter: 'stylish'
        })
    ]
}